package com.fhz.a2102shopjava.ui.goods;

import androidx.lifecycle.LiveData;

import com.fhz.a2102shopjava.anno.LiveDataCallAdapterFengService;
import com.fhz.a2102shopjava.api.FengService;
import com.fhz.a2102shopjava.callback.ApiResponse;
import com.fhz.a2102shopjava.entity.Orders;
import com.fhz.a2102shopjava.entity.ShoppingCart;

import java.util.List;

import javax.inject.Inject;

import retrofit2.http.Query;

/**
 * 时间:2023/8/16
 *
 * @author Mr.Feng
 * 简述:
 */
public class GoodsRemoteDataSource {
    @Inject
    @LiveDataCallAdapterFengService
    FengService mFengService;

    @Inject
    public GoodsRemoteDataSource() {
    }

    public LiveData<ApiResponse<List<ShoppingCart>>> getAllByUserId(int userId){
        return mFengService.getAllByUserId(userId);
    }

    public LiveData<ApiResponse<ShoppingCart >> updateNum( int cartId,  int num){
        return mFengService.updateNum(cartId, num);
    }
}
